home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 16 / FlowLayoutDemo.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-09-08  |  968 b   |  21 lines

  1. import java.applet.Applet;
  2. import java.awt.Button;
  3. import java.awt.Container;
  4. import java.awt.FlowLayout;
  5. import java.util.StringTokenizer;
  6.  
  7. public class FlowLayoutDemo extends Applet {
  8.    public void init() {
  9.       ((Container)this).setLayout(new FlowLayout(2, 10, 3));
  10.       Integer.parseInt(((Applet)this).getParameter("width"));
  11.       Integer.parseInt(((Applet)this).getParameter("height"));
  12.       String var1 = "Data is not information is not knowledge is not wisdom.";
  13.       StringTokenizer var2 = new StringTokenizer(var1);
  14.  
  15.       while(var2.hasMoreTokens()) {
  16.          ((Container)this).add(new Button(var2.nextToken()));
  17.       }
  18.  
  19.    }
  20. }
  21.